
import { lazy } from 'react';
import { Navigate } from 'react-router-dom';
import UserRoutes from '../User/route'
import AnnoRoutes from '../Anno/route'
import AdviseRoutes from '../Advise/route'
import JiaoWuRoutes from '../Edu/route'





const  Main  = lazy(()=>import('./index'))
const  Home  = lazy(()=>import('../Home/Home'))
const  Mine  = lazy(()=>import('../Mine/Mine'))
const  Grade  = lazy(()=>import('../Grade/Grade'))
const  Role  = lazy(()=>import('../Role/RoleList'))



export default [
    {
        path:"/main",
        element:<Navigate replace to="/main/home" /> 
    },
    {
        path:'/main',
        element:<Main/>,
        children:[
            {
                path:"/main/home",
                element:<Home/>,
            },
            {
                path:"/main/mine",
                element:<Mine/>,
            },
            {
                path:"/main/grade",
                element:<Navigate replace to="/main/grade/list" /> 
            },
            {
                path:"/main/grade/list",
                element:<Grade/>,
            },
            {
                path:"/main/role",
                element:<Role/>,
            },
            ...UserRoutes,
            ...AnnoRoutes,
            ...AdviseRoutes,
            ...JiaoWuRoutes,
        ]
    }
]